package cn.wolfcode.luowowo.comment.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 问答评论
 */
@Setter
@Getter
@Document("wenda_comment")
public class WendaComment implements Serializable {
    @Id
    private String id;
    private Long answerId;//回答的问题id
    private String questionTitle;
    private Long userId;//用户的id
    private String username;//用户的名字
    private int level;//用户的等级
    private String headImgUrl;//用户的头像
    private Date createTime;//评论时间
    private String content;//评论的内容
    private String summary;//概要
    private int favornum;//收藏数
    private int thumbupnum;//点赞数
    private int replynum; //回复数
    private WendaComment replyComment;//回复的评论
    private List<WendaComment> comments = new ArrayList<>();//评论人
}